package cn.changeforyou.base.exception;

import cn.changeforyou.base.model.Module;

public enum DataExceptionEnum implements ErrorInfo {

    PARAM_BLANK(1, "参数为空"),
    PARAM_ERROR(2, "参数调用非法"),

    ;
    DataExceptionEnum(int unitCode, String message) {
        this.unitCode = unitCode;
        this.message = message;
    }

    private final int unitCode;
    private final String message;

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public int unitCode() {
        return unitCode;
    }

    @Override
    public Module getModule() {
        return Module.DATA_MODULE;
    }
}
